/* 基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* 布局样式 */
.ant-layout {
  background: #ffffff !important;
}

.ant-layout-header {
  background: #ffffff !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  z-index: 100;
  padding: 0 !important;
  height: auto !important;
  line-height: 1.5 !important;
  border-bottom: 1px solid #f0f0f0;
}

/* 工具栏样式 */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  padding: 6px 12px;
  background: #ffffff;
}

.toolbar-group {
  display: flex;
  align-items: center;
  padding: 4px;
  background: transparent;
  border-radius: 6px;
  position: relative;
  gap: 2px;
}

.toolbar-group:hover {
  background: rgba(0, 0, 0, 0.02);
}

.toolbar-group-title {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: #8c8c8c;
  background: transparent;
  padding: 0 4px;
  white-space: nowrap;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.toolbar-divider {
  width: 1px !important;
  height: 24px !important;
  margin: 0 8px !important;
  background: #f0f0f0 !important;
}

/* 内容区域样式 */
.mind-map-container {
  width: 100%;
  height: 100%;
  background: #fafafa;
  position: relative;
  overflow: hidden;
  /* width: 100%;
  height: 100%;
  background: #fafafa;
  position: relative;
  overflow: hidden; */
}

/* 按钮样式 */
.ant-btn {
  border: none !important;
  background: transparent !important;
  color: #595959 !important;
  padding: 6px !important;
  height: 32px !important;
  width: 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 4px !important;
  transition: all 0.2s !important;
}

.ant-btn:hover {
  color: #1890ff !important;
  background: rgba(24, 144, 255, 0.1) !important;
}

.ant-btn .anticon {
  font-size: 16px;
}

/* Select 组件样式 */
.ant-select {
  min-width: 120px !important;
}

.ant-select:not(.ant-select-disabled) .ant-select-selector {
  border-color: #d9d9d9 !important;
  border-radius: 4px !important;
  transition: all 0.2s !important;
}

.ant-select:not(.ant-select-disabled):hover .ant-select-selector {
  border-color: #40a9ff !important;
}

.ant-select-focused .ant-select-selector,
.ant-select-selector:focus,
.ant-select-selector:active {
  border-color: #40a9ff !important;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1) !important;
}

/* 思维导图节点样式 */
.smm-node {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.smm-node:hover {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.smm-node-active {
  box-shadow: 0 0 0 2px #1890ff !important;
}

/* 连接线样式 */
.smm-line {
  transition: all 0.2s;
  opacity: 0.8;
}

.smm-line:hover {
  opacity: 1;
}

/* 小地图样式 */
.smm-minimap {
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

/* 搜索框样式 */
.smm-search {
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  background: #ffffff;
  border: none;
  padding: 16px;
}

.smm-search input {
  border-radius: 4px;
  border: 1px solid #d9d9d9;
  padding: 8px 12px;
  width: 100%;
  font-size: 14px;
}

.smm-search input:focus {
  border-color: #40a9ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
  outline: none;
}

/* 工具栏分组样式 */
.group-basic {
  background: rgba(24, 144, 255, 0.04);
}

.group-node {
  background: rgba(82, 196, 26, 0.04);
}

.group-style {
  background: rgba(250, 173, 20, 0.04);
}

.group-tools {
  background: rgba(114, 46, 209, 0.04);
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid transparent;
  background-clip: padding-box;
}

/* 响应式布局 */
@media screen and (max-width: 768px) {
  .toolbar {
    padding: 4px;
    gap: 0;
  }

  .toolbar-group {
    padding: 2px;
  }

  .ant-btn {
    padding: 4px !important;
    height: 28px !important;
    width: 28px !important;
  }

  .ant-select {
    min-width: 100px !important;
  }

  .toolbar-group-title {
    display: none;
  }
}

/* 导出对话框样式 */
.ant-modal {
  border-radius: 8px;
  overflow: hidden;
}

.ant-modal-content {
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ant-modal-header {
  border-bottom: none;
  padding: 0 0 16px 0;
}

.ant-modal-title {
  font-weight: 500;
  font-size: 16px;
  color: #262626;
}

.ant-modal-footer {
  border-top: none;
  padding: 16px 0 0 0;
}

/* 主题切换动画 */
.mind-map-container * {
  transition: background-color 0.3s, border-color 0.3s, box-shadow 0.3s;
}
